package cn.chenfei.sshd.client.ui;

import cn.chenfeifx.core.common.SimpleControl;
import cn.chenfeifx.core.controls.CFForm;
import cn.chenfeifx.core.controls.CFRadioButton;
import javafx.scene.Node;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;

public class SshdView extends StackPane {

    private final ToggleGroup tg = new ToggleGroup();
    private final CFRadioButton fileRB = new CFRadioButton("文件", tg);
    private final CFRadioButton folderRB = new CFRadioButton("文件夹", tg);
    private final CFForm form = new CFForm();

    public SshdView() {
        initialize();
    }

    private void initialize() {
        getStyleClass().add("sshd-view");
        loadFormChildren();
        getChildren().add(form);
    }

    private void loadFormChildren() {
        form.add(SimpleControl.getLabel("选择需要部署的Jar文件", SimpleControl.LabelEnum.H4), 0);
        form.addNodes("方式", new Node[]{fileRB, folderRB}, 1);
    }

}
